From 258fa3fb0fa6ca6b3b915406cc91848044d33156 Mon Sep 17 00:00:00 2001 From: oliskoli Date: Tue, 25 Apr 2006 18:49:46 +0000 Subject: [PATCH] Let stmwpp only create one kind of GPS data. Waypoints or a route with routepoints. Reference data changed! --- reference/route/stmwpp-route.gpx | 38 -------------------------------- stmwpp.c | 17 ++++++++------ 2 files changed, 10 insertions(+), 45 deletions(-) diff --git a/reference/route/stmwpp-route.gpx b/reference/route/stmwpp-route.gpx index c3690762d..0d1ee22ce 100644 --- a/reference/route/stmwpp-route.gpx +++ b/reference/route/stmwpp-route.gpx @@ -61,42 +61,4 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/ Völkerschlachtdenkmal Völkerschlachtdenkmal - - - - NARVA - - - - Liebknechtstras - - - - Jahnstrasse11 - - - - Elsterberg - - - - Greiz - - - - Gosel - - - - 3 - - - - Altenburg-Umgehung - - - - Völkerschlachtdenkmal - - diff --git a/stmwpp.c b/stmwpp.c index ba56400da..6fb4c4c7c 100644 --- a/stmwpp.c +++ b/stmwpp.c @@ -36,6 +36,7 @@ static waypoint *wpt; #define STM_NOTHING 0 #define STM_WAYPT 1 #define STM_TRKPT 2 +#define STM_RTEPT 3 static int track_index; static int track_num; @@ -152,16 +153,18 @@ stmwpp_data_read(void) switch(what) { - case STM_WAYPT: - waypt_add(waypt_dupe(wpt)); - if (route == NULL) - { - route = route_head_alloc(); - route_add_head(route); + case STM_RTEPT: + if (route == NULL) { + route = route_head_alloc(); + route_add_head(route); } route_add_wpt(route, wpt); break; + case STM_WAYPT: + waypt_add(wpt); + break; + case STM_TRKPT: if (track == NULL) { @@ -270,7 +273,7 @@ stmwpp_data_write(void) waypt_disp_all(stmwpp_waypt_cb); break; case rtedata: - what = STM_WAYPT; + what = STM_RTEPT; route_disp_all(stmwpp_track_hdr, stmwpp_track_tlr, stmwpp_waypt_cb); break; case trkdata: -- 2.30.2